#ifndef STARTUPCONFIGURATIONFILE_H
#define STARTUPCONFIGURATIONFILE_H
//#include "includeFiles.h"

class StartUpConfigurationFile
{
	private:
	//init
	uint16_t Port;
	char *HostName;
	unsigned long Location;
	string HomeDir;
	string LogFilename;
	uint32_t AutoShutdown;
	uint8_t TTL;
	uint32_t MsgLifetime;
	uint32_t GetMsgLifetime;
	uint32_t InitNeighbors;
	uint32_t JoinTimeout;
	uint32_t KeepAliveTimeout;
	uint32_t MinNeighbors;
	bool NoCheck;
	float CacheProb;
	float StoreProb;
	float NeighborStoreProb;
	uint32_t CacheSize;
	multimap<string,uint16_t> beaconList;						// list of beacons
	multimap<string,int> neighborList;							// list of neighbor
	list<int> removeConnectionList;								// list of connection to remove i.e. for tie breaker
	map<string, int> uoidMessageLifeTime;									// UOID with MsgLifeTime - delete UOID when MsgLifeTime out takes place
	map<string, int> uoidSocketDescripter;									// which UOID msg is forwarded, so that when the same msg comes again, it should be deleted						
	string senderStatusUoid;


	//multimap<string,uint16_t>::iterator it;

	char *nodeID;
	char *nodeInstanceID;


	//beacons
	uint32_t Retry;
  
	public:    
	//get functions
	StartUpConfigurationFile();
	uint16_t getPort();
	char *getHostName();
	unsigned long int getLocation();
	string getHomeDir();
	string getLogFilename();
	uint32_t getAutoShutdown();
	uint8_t getTTL();
	uint32_t getMsgLifetime();
	uint32_t getGetMsgLifetime();
	uint32_t getInitNeighbors();
	uint32_t getJoinTimeout();
	uint32_t getKeepAliveTimeout();
	uint32_t getMinNeighbors();
	bool getNoCheck();
	float getCacheProb();
	float getStoreProb();
	float getNeighborStoreProb();
	uint32_t getCacheSize();
	uint32_t getRetry();
	multimap<string,uint16_t> getBeaconList();
    multimap<string,int> getNeighborList();
	list<int> getRemoveConnectionList();
	char* getNodeID();
	char* getNodeInstanceID();
	map<string, int> getUoidMessageLifeTime();
	map<string, int> getUoidSocketDescripter();
	string getUOIDStatus();

	//set functions
	void setPort(uint16_t port);
	void setHostName(char* HostName);
	void setNodeID(char* hostname, uint16_t port);
	void setNodeInstanceID(char *nodeID);
	void setNeighborList(multimap<string, int> neighborList);
	void setRemoveConnectionList(list<int> removeConnectionList);
	void setUoidMessageLifeTime(map<string, int> uoidMessageLifeTime);
	void setUoidSocketDescripter(map<string, int> uoidSocketDescripter);
	void setUOIDStatus(string senderStatusUoid);
  
	void VerifyIfHomeDirectoryExists();
	int verifyIfInitFileIsPresent();

	// function to parse the config file
	void ParseStartupConfigFile(string myFile);

};
#endif


